﻿// Module:             Games Programming
// Assignment1:        Platformer Game
// Add game feature:   Flat Platform
// Student Number:     S10096666C
// Student Name:       Trinh Quang Anh

//////////////////////////////////////////////////////////////////////////

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Game.Platforms
{
    class InfoPlatform : IPlatform
    {
        private PlatformType _type;
        private Texture2D _texture;
        private int _width;
        private int _height;
        private Vector2 _position;

        public void Spawn(PlatformType type, Texture2D texture, int x, int y)
        {
            _type = type;
            _texture = texture;
            _width = texture.Width;
            _height = texture.Height;
            _position = new Vector2(x * Game1.GridSize, y * Game1.GridSize);

            //_boundingRect = new Rectangle(x * Game1.GridSize, y * Game1.GridSize, _width, _height);
        }

        public void Spawn(PlatformType type, Texture2D texture, Vector2 pos)
        {
            _type = type;
            _texture = texture;
            _width = texture.Width;
            _height = texture.Height;
            _position = pos;

            //_boundingRect = new Rectangle((int)pos.X, (int)pos.Y, _width, _height);
        }

        public void Update(GameTime gameTime)
        {
            // nope, do nothing
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(_texture, _position, Color.White);
        }

        public Vector2 Position
        {
            get { return _position; }
        }

        public PlatformType Type
        {
            get { return _type; }
        }

        public Rectangle BoundingRect { get { return Rectangle.Empty; } }
    }
}
